import instance from "@/utils/request";

let activity={
    //分页查询
    searchPage(parems){
        return instance.get(`activity`,{params:parems})
    },
//分页查询已审核的数据
    searchPage1(parems){
        return instance.get(`activity/findByApproveStatus`,{params:parems})
    },
    //根据id查询已审核的数据
    findByActivityId(id){
        return instance.get(`activity-info/${id}`)
    },
    //添加已审核的数据
    addEntityById(entity){
        return instance.post(`activity-info`,entity)
    },

    //添加
    addEntity(entity){
        return instance.post(`activity`,entity)
    },
    //查询根据id查询
    findById(id){
        return instance.get(`activity/${id}`)
    },
    //修改
    updateEntity(entity){
        return instance.put(`activity`,entity)
    },
    /**
     * 删除
     */
    deleteById(id){
        return instance.delete(`activity/${id}`)
    },
    /**
     * 批量删除
     */
    batchDelete(ids){
        return instance.delete(`activity/${ids}`)
    },
}

export default activity;